#ifndef CONST_H
#define CONST_H

/* @(#)const.h	1.1 */

/*
 * fundamental constants of the implementation --
 * cannot be changed easily
 */

#define	DBLKSIZ	512		/* diskblock size : 512 bytes */
//From info/ino.h
#define	INSIZ	64	/* size of a dinode in bytes	*/
#define	INOPB	8	/* 8 inodes per disk block	*/
#define	ROOTINO	((ino_x)2)	/* inode number of all roots */
/* convert an inumber to a disk address */
#define	itod(x)	(daddr_t)(((uint)((x)+15)>>3))
/* convert an inumber to a disk offset within a block */
#define	itoo(x)	(int)(((x)+15)&07)
/* encoding of inode type in di_mode (upper 4 of 16 bits) */
#define	X_IFMT	0170000		/* type of file (mask upper 4 bits) */
#define		X_IFIFO 0010000 /* FIFO special file */
#define		X_IFCHR	0020000	/* character special */
#define		X_IFMPC	0030000	/* multiplexed char special */
#define		X_IFDIR	0040000	/* directory */
#define		X_IFBLK	0060000	/* block special */
#define		X_IFMPB	0070000	/* multiplexed block special */
#define		X_IFREG	0100000	/* regular */

#endif /*CONST_H*/
